﻿<%@ page import="code.util.ParamUtils" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%
     String info = ParamUtils.getAttribute(request, "info", "");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    
    <title>CodeSharer——登录</title>
	<link href="css/s-9.css" rel="stylesheet" type="text/css" />
    <link href="css/s_head.css" rel="stylesheet" type="text/css" />
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <SCRIPT language="javascript" src="js/comm.js"></SCRIPT>
  </head>


<body>
<div id="head">
	<div class="hd">
		<div class="l tac wl2" style="width:230px;padding:3px;">
			<div style="padding-left:55px;"><a href="servlet/ShowIndex1"><img src="images/pcslogo.gif" width="106" height="36"/></a></div>
		</div>

		<div class="h3"><a href="reg.jsp" class="ce">注册</a> ┊ <a href="login.jsp" class="ce">登录</a> ┊ <a href="#" class="ce">帮助</a>
		</div>
		<div class="c"></div>
	</div>
</div>

<center>
<div class="Rcont" align="center">
  <div class="log_area">
    <!--登录提示信息-->
    <div id=prompt0 style="display:none;"></div>
    <div><img src="images/dl_l_t.gif" width="362" height="5"></div>
    <div class="dl_l_bg">
      <form name="frmLogin" action="" method="post" onSubmit="userPass.value=md5_3(userPass.value)">
       
        <div class="r6l2 mb10"><b>登录CodeSharer</b></div>
		<div><%=info.equals("") ? "" : info%></div>
        <div class="bj_dmb">
		
          <div class="dl_l">用户名：</div>
          <div class="l"><span class="it_s">
            <input name="userName" size="20" class="it1" onFocus="this.className='it2';" onBlur="this.className='it1';" style="width: 240px; height: 25px; font-weight: bold; font-size: 14px;" value="" type="text">
          </span></div>
          <div class="c"></div>
        </div>
        <div class="bj_dmb">
          <div class="dl_l">密 码：</div>
          <div class="l"><span class="it_s">
            <input name="userPass" size="20" class="it1" onFocus="this.className='it2';" onBlur="this.className='it1';" style="width: 240px; height: 25px; font-weight: bold; font-size: 14px;" value="" type="password">
          </span></div>
          <div class="c" style="margin-top: -5px;"></div>
        </div>
        <div class="bj_dmb" id="randdiv">
          <div class="dl_l">验证码：</div>
          <div class="l"><span class="it_s">
            <input name="userRandomCode" id="code" type="text" size="20" class="it1" onFocus="this.className='it2';" onBlur="this.className='it1';" />
            </span>
          </div>
          <div style="padding:3px;"></div>
          <div class="l" style="margin-left:50px;"><img border=0 src="servlet/RandomCodeCtrl" width="140" height="25"></div>
          <div class="c" style="margin-top: -5px;"></div>
        </div>
        <div style="padding:10px 0 0 60px;"> <span class="rbs1" style="clear:both">
          <input name="submit" type="submit" class="rb1" id="btn_dl" onClick="validateLogin();" onMouseOver="this.className='rb2';" onMouseOut="this.className='rb1';" value="登录"></span> 
         </div>
        <div class="c"></div>
        <div class="tar" style="width:310px; padding-bottom:15px;">
          <p><a href="reg.jsp" class="sl f12">立即注册</a></p>
        </div>
      </form>
      <script language="javaScript">
     function validateLogin()
     {
      var sUserName = document.frmLogin.userName.value;
      var sPassword = document.frmLogin.userPass.value;
      var sTestCode = document.frmLogin.userRandomCode.value;
      if( sUserName=="" )
      {
       alert("请输入用户名");
       return false;
      }
      else if( sPassword=="" )
      {
       alert("请输入密码");
       return false;
      }
      else if( sTestCode=="" )
      {
      	alert("请输入验证码");
      	return false;
      }
      else{
	     document.frmLogin.action="servlet/DoLogin"
	     document.frmLogin.Submit(); 
      }
     }
    </script>
    </div>
    <div><img src="images/dl_l_b.gif" width="362" height="5"></div>
  </div>
</div>
</center>

<div id="b">
	<div class="b1"><a href="#" class="c6" target="_blank">关于我们</a><span>┊</span><a href="/s/contact.html" class="c6" target="_blank">联系方式</a><span>┊</span><a href="/t/feedback.html" class="c6" target="_blank">意见反馈</a><span>┊</span><a href="/s/help.html" class="c6" target="_blank">帮助中心</a>　 &nbsp;<a class=c6 href=http://www.miibeian.gov.cn target=_blank>NENU</a> <img src="images/gs.gif" width="15" align="absmiddle" />&nbsp;<img src="images/jc.gif" width="17" align="absmiddle" /></div>

</div>


</body>
</html>
